package com.drug.mingkang.service.impl;


import com.drug.mingkang.mapper.ImmMemberMapper;
import com.drug.mingkang.model.ImmMember;
import com.drug.mingkang.service.ImmMemberService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (ImmMember)表服务实现类
 *
 * @author makejava
 * @since 2020-08-12 09:07:54
 */
@Service("immMemberService")
class ImmMemberServiceImpl implements ImmMemberService {
    @Resource
    private ImmMemberMapper immMemberMapper;

    /**
     * 通过ID查询单条数据
     *
     * @param memberId 主键
     * @return 实例对象
     */
    @Override
    public ImmMember queryById(String memberId) {
        return this.immMemberMapper.queryById(memberId);
    }

    /**
     * Wutao
     * 根据会员名查询
     * @param memberAccout
     * @return
     */
    @Override
    public ImmMember selectAccout(String memberAccout) {
        return this.immMemberMapper.selectAccout(memberAccout);
    }

    /**
     * 查询多条数据
     *

     * @return 对象列表
     */
    @Override
    public List<ImmMember> queryAllByLimit(ImmMember immMember) {
        return this.immMemberMapper.queryAllByLimit(immMember);
    }

    @Override
    public List<ImmMember> queryAllByLimits(ImmMember immMember) {
        return this.immMemberMapper.queryAllByLimits(immMember);
    }

    /**
     * 新增数据
     *
     * @param immMember 实例对象
     * @return 实例对象
     */
    @Override
    public int insert(ImmMember immMember) {
        return this.immMemberMapper.insert(immMember);
    }

    /**
     * 修改数据
     *
     * @param immMember 实例对象
     * @return 实例对象
     */
    @Override
    public int update(ImmMember immMember) {
        return this.immMemberMapper.update(immMember);
    }



    /**
     * 通过主键删除数据
     *
     * @param memberId 主键
     * @return 是否成功
     */
    @Override
    public int deleteById(String memberId) {
        return this.immMemberMapper.deleteById(memberId);
    }

    @Override
    public int selectCount(ImmMember immMember) {
        return this.immMemberMapper.selectCount(immMember);
    }

    public List<ImmMember> queryAll(ImmMember immMember){
        return this.immMemberMapper.queryAll(immMember);
    }
}
